package com.geen.tuoke.ui.dialog

import android.content.Context
import androidx.databinding.DataBindingUtil
import com.geen.tuoke.R
import com.geen.tuoke.databinding.DialogTaskPhoneDeleteBinding
import com.geen.tuoke.utils.ext.dp2px
import com.geen.tuoke.widget.dialog.DialogViewHolder
import com.geen.tuoke.widget.dialog.XXDialog
import com.qmuiteam.qmui.kotlin.onClick

/**
 * @Desc 号码详情弹窗
 */
class DialogTaskPhoneDelete(
    context: Context,
    private var onConfirm: ( ) -> Unit
) : XXDialog(context, R.layout.dialog_task_phone_delete) {

    private var mBinding: DialogTaskPhoneDeleteBinding? = null

    init {
        setWidthAndHeight(dp2px(288f), 0)
        setCanceledOnTouchOutside(false)
    }


    override fun convert(holder: DialogViewHolder) {
        mBinding = DataBindingUtil.bind(holder.convertView)
        mBinding?.run {
            tvConfirm.onClick {
                onConfirm()
                dismiss()
            }

        }
    }


}